load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "search.go",
        "status.go",
        "tide.go",
    ],
    importpath = "k8s.io/test-infra/prow/tide",
    visibility = ["//visibility:public"],
    deps = [
        "//prow/apis/prowjobs/v1:go_default_library",
        "//prow/config:go_default_library",
        "//prow/git/v2:go_default_library",
        "//prow/github:go_default_library",
        "//prow/io:go_default_library",
        "//prow/pjutil:go_default_library",
        "//prow/tide/blockers:go_default_library",
        "//prow/tide/history:go_default_library",
        "//prow/version:go_default_library",
        "@com_github_prometheus_client_golang//prometheus:go_default_library",
        "@com_github_shurcool_githubv4//:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/util/errors:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client:go_default_library",
        "@io_k8s_sigs_yaml//:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//prow/tide/blockers:all-srcs",
        "//prow/tide/history:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

go_test(
    name = "go_default_test",
    srcs = [
        "search_test.go",
        "status_test.go",
        "tide_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//prow/apis/prowjobs/v1:go_default_library",
        "//prow/config:go_default_library",
        "//prow/git/localgit:go_default_library",
        "//prow/git/v2:go_default_library",
        "//prow/github:go_default_library",
        "//prow/tide/blockers:go_default_library",
        "//prow/tide/history:go_default_library",
        "@com_github_go_test_deep//:go_default_library",
        "@com_github_google_go_cmp//cmp:go_default_library",
        "@com_github_google_gofuzz//:go_default_library",
        "@com_github_shurcool_githubv4//:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_apimachinery//pkg/api/equality:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/runtime:go_default_library",
        "@io_k8s_apimachinery//pkg/util/diff:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client/fake:go_default_library",
        "@io_k8s_utils//pointer:go_default_library",
    ],
)
